package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import entity.loginentity;
import service.loginentityservice;
@WebServlet("/selectuser")
public class selectuser extends HttpServlet {
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");
		resp.setCharacterEncoding("utf-8");
		resp.setContentType("text/html;charest=utf-8");
		
		loginentityservice loservice=new loginentityservice();
		String phone=req.getParameter("phone");
		String userPassword=req.getParameter("userPassword");
		req.setAttribute("p", loservice.userid(phone, userPassword));
		req.getRequestDispatcher("wo.jsp").forward(req, resp);
	}
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doGet(req, resp);
	}
	

}
